package com.antd.common.sms.fegin.fallback;

import com.antd.admin.api.entity.SysSmsLog;
import com.antd.common.core.util.R;
import com.antd.common.sms.fegin.RemoteSmsLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author 子丶沫
 * @version 1.0
 * @date 2020/12/2 11:10
 */
@AllArgsConstructor
@Slf4j
public class RemoteSmsLogFallBack implements RemoteSmsLogService {
    private final Throwable throwable;
    @Override
    public R<Object> saveSmsLog(SysSmsLog smsLog) {
        log.error("feign 保存日志失败:{}", smsLog, throwable);
        return R.error("保存日志失败");
    }
}
